5 research outputs found

    An Object-oriented Formal Notation: Executable Specifications in Clay = Una notación formal orientada a objetos : especificaciones ejecutables con Clay

    Full text link
    This thesis presents Clay, a stateless object-oriented formal notation. Clay is class-based, has a nominal type system that integrates algebraic types and inheritance, has equality, method overriding with Scandinavian semantics, dynamic binding, and a rather permissive overloading. The type system of Clay is used to reject illegal specifications, and also to help guide the translation schemes that define the Clay semantics and the generation of executable prototypes. Clay has a first-order semantics that gives an interpretation in first-order logic of the main object-oriented constructions: inheritance, defining classes by cases, overloading, dynamic binding and static equality. Furthermore, the use of the concrete syntax of an automatic theorem prover (Prover9/Mace4) has allowed mechanising both, the Clay's meta-theory and specifications. For example, some of the theorems about Clay in this thesis have been proved semi-automatically. The thesis presents also a compilation scheme of Clay specifications into Prolog programs. Code can be generated from implicit specifications, even recursive ones, something hard to find in other tools. My implementation takes advantage of various logic programming techniques in order to achieve reasonable efficiency: constraints, constructive negation, Lloyd-Topor transforms, incremental deepening search, etc. A Clay compiler is also contributed, a tool that goes beyond the mathematical presentation of the translations into first-order logic and the synthesis of logic programs. I have built a compiler that supports syntax analysis of modular Clay specifications, type checking, translation of Clay specifications into first-order theories in Prover9/Mace4, and synthesis of executable Prolog prototypes

    A model-driven approach to teaching concurrency

    Get PDF
    We present an undergraduate course on concurrent programming where formal models are used in different stages of the learning process. The main practical difference with other approaches lies in the fact that the ability to develop correct concurrent software relies on a systematic transformation of formal models of inter-process interaction (so called shared resources), rather than on the specific constructs of some programming language. Using a resource-centric rather than a language-centric approach has some benefits for both teachers and students. Besides the obvious advantage of being independent of the programming language, the models help in the early validation of concurrent software design, provide students and teachers with a lingua franca that greatly simplifies communication at the classroom and during supervision, and help in the automatic generation of tests for the practical assignments. This method has been in use, with slight variations, for some 15 years, surviving changes in the programming language and course length. In this article, we describe the components and structure of the current incarnation of the course?which uses Java as target language?and some tools used to support our method. We provide a detailed description of the different outcomes that the model-driven approach delivers (validation of the initial design, automatic generation of tests, and mechanical generation of code) from a teaching perspective. A critical discussion on the perceived advantages and risks of our approach follows, including some proposals on how these risks can be minimized. We include a statistical analysis to show that our method has a positive impact in the student ability to understand concurrency and to generate correct code
    corecore